//
// Created by 67678 on 2023/3/15.
//

#ifndef WEBSERVER_TESTINIT_H
#define WEBSERVER_TESTINIT_H


#include "../threadPool/threadPool.h"
#include "../event/eventLoop.h"
#include "../timer/timer.h"
#include "../socket/socketServer.h"
#include "../socket/epoll.h"

using namespace timer;
using namespace threadPool;
using namespace event;
using namespace socket_epoll;

void init() {
    ThreadPool &threadPool = ThreadPool::getInstance();
    threadPool.init(4);

    EventLoop &eventLoop = EventLoop::getInstance();
    eventLoop.init();
    eventLoop.loopBackground();

    Timer &timer = Timer::getInstance();
    timer.init();

    Epoll &epoll = Epoll::getInstance();
    epoll.init();

    SocketServer &socketServer = SocketServer::getInstance();
    socketServer.init();
}

#endif //WEBSERVER_TESTINIT_H
